﻿@model AutoMail.Models.SettingDetailsViewModel

@{
    ViewData["Title"] = "Mail Sending Setting";
}

<form asp-action="MailSendingSetting">
    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <input type="hidden" asp-for="Id" />

    <h4>Mail Sending Times</h4>
    <hr />
    <div class="row">
        <div class="col-md-2">
            <label>Birthday mail sending time: </label>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="BirthdayMailSendTimeHour" class="control-label"></label>
                <input asp-for="BirthdayMailSendTimeHour" class="form-control" />
                <span asp-validation-for="BirthdayMailSendTimeHour" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="BirthdayMailSendTimeMinute" class="control-label"></label>
                <input asp-for="BirthdayMailSendTimeMinute" class="form-control" />
                <span asp-validation-for="BirthdayMailSendTimeMinute" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="BirthdayMailSendTimeSecond" class="control-label"></label>
                <input asp-for="BirthdayMailSendTimeSecond" class="form-control" />
                <span asp-validation-for="BirthdayMailSendTimeSecond" class="text-danger"></span>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-2">
            <label>Anniversary mail sending time: </label>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="AnniversaryMailSendTimeHour" class="control-label"></label>
                <input asp-for="AnniversaryMailSendTimeHour" class="form-control" />
                <span asp-validation-for="AnniversaryMailSendTimeHour" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="AnniversaryMailSendTimeMinute" class="control-label"></label>
                <input asp-for="AnniversaryMailSendTimeMinute" class="form-control" />
                <span asp-validation-for="AnniversaryMailSendTimeMinute" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-1">
            <div class="form-group">
                <label asp-for="AnniversaryMailSendTimeSecond" class="control-label"></label>
                <input asp-for="AnniversaryMailSendTimeSecond" class="form-control" />
                <span asp-validation-for="AnniversaryMailSendTimeSecond" class="text-danger"></span>
            </div>
        </div>
    </div>

    <hr />
    <h4>Mail Sending Server</h4>
    <hr />

    <div class="row">
        <div class="col-md-3">
            <div class="form-group">
                <label asp-for="SmtpHost" class="control-label"></label>
                <input asp-for="SmtpHost" class="form-control" />
                <span asp-validation-for="SmtpHost" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-2">
            <div class="form-group">
                <label asp-for="SmtpPort" class="control-label"></label>
                <input asp-for="SmtpPort" class="form-control"/>
                <span asp-validation-for="SmtpPort" class="text-danger"></span>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="form-group">
                <label asp-for="UserName" class="control-label"></label>
                <input asp-for="UserName" class="form-control" />
                <span asp-validation-for="UserName" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-2">
            <div class="form-group">
                <label asp-for="Password" class="control-label"></label>
                <input asp-for="Password" class="form-control" />
                <span asp-validation-for="Password" class="text-danger"></span>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-3">
            <div class="form-group">
                <label asp-for="From" class="control-label"></label>
                <input asp-for="From" class="form-control" />
                <span asp-validation-for="From" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-2">
            <div class="form-group">
                <label asp-for="Encoding" class="control-label"></label>
                <input asp-for="Encoding" class="form-control" />
                <span asp-validation-for="Encoding" class="text-danger"></span>
            </div>
        </div>
        <div class="col-md-2 mt-4">
            <div class="form-group">
                <label asp-for="EnableSsl" class="control-label"></label>
                <input type="checkbox" asp-for="EnableSsl" class=""form-check-input" value="true" />
                <span asp-validation-for="EnableSsl" class="text-danger"></span>
            </div>
        </div>
    </div>

    <div class="m-sm-2 form-group">
        <input type="submit" value="Save" class="btn btn-primary" />
    </div>

</form>

@section Scripts {
    @{
        await Html.RenderPartialAsync("_ValidationScriptsPartial");
    }
}
